-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility: Handle the iOS z-gesture to exit modals and block selection #926
Conversation
Updated from develop to incorporate changes made from the Video Block PR. There was a problem to implement long press on the image to show the image edit options: I fixed this problem simply by removing the long-press gesture from the image, but this is not ideal. Thinking on a way to preserve the modularization of I did this in this branch: https://github.com/WordPress/gutenberg/compare/rnmobile/media-upload-as-hoc?w=1 It turned out to be a big-ish refactor, so I prefer to not add it to this PR. If there's a better place, or a better alternative, I'd be happy to edit that branch. About this PR, I think that to not add the long-press functionality just yet is the best option for now. |
hey @etoledom if I understood correctly what you are trying to do is opening the MediaUpload options picker on a long press. You can do that just by wrapping the component with
I don't think we should move that much away from the web side, it would make it very hard to implement media related blocks cross platform in the future. |
So, it's fine to wrap all the I thought about that for a second but it sounds a bit messy 🤔
I totally agree. |
@etoledom as far as I understand it is enough to wrap these two separately: -------- |
@pinarol - Thank you for the recommendations! Updated with the recommended solution. I noticed that the Tried to do it in a way that the syntax doesn't look so bad, converting the current component into a function, and returning that function on |
@etoledom thanks, looks good 👍 let me test a bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with WPiOS, looks and works good 🎉
Gutenberg PR: WordPress/gutenberg#15153
This PR improves accessibility on modals and blocks. It also makes images easily editable by listening for a long press event on the image.
Testing Instructions (iOS)
Testing Instructions (Android)